{extend name="index_layout"/}
{block name="main"}
<form class="layui-form" method="post">

    <div class="layui-form-item">
        <label class="layui-form-label">用户ID</label>
        <div class="layui-input-block">
            {:Form::selectpage("row[custom_id]",'','admin/custom/index','username','id',["lay-verify"=>"required"])}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">开始日期</label>
        <div class="layui-input-block">
            <input id="c-date" lay-verify="required" data-date-type="date" class="datetime layui-input" name="row[date]" type="text" value="{:date('Y-m-d')}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">维护到期时间</label>
        <div class="layui-input-block">
            <input id="c-expire_time" lay-verify="required" data-date-type="date" class="datetime layui-input" name="row[expire_time]" type="text" value="{:date('Y-m-d')}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">项目名称</label>
        <div class="layui-input-block">
            <input id="c-title" lay-verify="required" class=" layui-input" name="row[title]" type="text">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">维护金额/年</label>
        <div class="layui-input-block">
            <input id="c-money" lay-verify="required" class=" layui-input" step="0.01" name="row[money]" type="number">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">合同/发票</label>
        <div class="layui-input-block">
            <div class="layui-col-xs4">
                <input id="c-attachfiles" lay-verify="required" class=" layui-input" size="50" name="row[attachfiles]" type="text">
            </div>
            <button type="button" id="faupload-attachfiles" class="layui-btn faupload" data-input-id="c-attachfiles" data-type="file" data-multiple="true" data-preview-id="p-attachfiles"><i class="layui-icon layui-icon-upload"></i> 上传</button><button type="button" id="fachoose-attachfiles" class="layui-btn fachoose" data-input-id="c-attachfiles" data-multiple="true"><i class="iconfont icon-other"></i> 选择</button>
            <ul class="layui-row list-inline plupload-preview" id="p-attachfiles"></ul>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">域名</label>
        <div class="layui-input-block">
            <input id="c-domain" lay-verify="required" class=" layui-input" name="row[domain]" type="text">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-block">
            <textarea id="c-notes" class=" layui-textarea" rows="5" name="row[notes]" cols="50"></textarea>
        </div>
    </div>
    <div class="layui-form-item layer-footer">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
{/block}
{block name="script"}
<script type="text/javascript">
layui.use('yznForm', function() {
    var yznForm = layui.yznForm;
    yznForm.bindevent($("form.layui-form"));
});
</script>
{/block}